import {Link} from 'react-router';
import {URL} from '../libs/Url';
import {Config} from '../libs/';
import '../imgs/avatar/avatar00.png';
import '../imgs/avatar/avatar10.png';
import '../imgs/avatar/avatar11.png';
import '../imgs/avatar/avatar12.png';
import '../imgs/avatar/avatar22.png';
import '../imgs/avatar/avatar21.png';
import '../imgs/avatar/avatar20.png';
import '../imgs/avatar/avatarundefined.png';
export default React.createClass({
    render(){
        return (
            <div className="col-md-4">
                <div className="media">
                    <Link
                        to={
                            Config.MENUS_ABSOLUTE.CLASS_TEACHERS_DETAIL.replace(':id', this.props.teacherid)
                        }
                        className="pull-left">
                        <img alt=""
                             width="103px"
                             height="103px"
                             src={require('./../imgs/avatar/avatar' + +(/\d+/.test(this.props.gender) ? this.props.gender + ((Math.random() * 10).toFixed() % 3) : 'undefined')
                                 + '.png')}
                             className=""/> </Link>
                    <div className="media-body">
                        <h4 className="media-heading">
                            <Link
                                to={
                                    Config.MENUS_ABSOLUTE.CLASS_TEACHERS_DETAIL.replace(':id', this.props.teacherid)
                                }>{this.props.name}
                            </Link>
                        </h4>
                        <h5>任教科目：{this.props.subject.name}</h5>
                        <p>{this.props.comment}</p>
                    </div>
                </div>
            </div>
        )
    }

})